package com.xiaoyin.community.Utils;


import com.xiaoyin.community.Domain.Result;

/**
 * Created by yinjianping@baidu.com on 2018/7/12.
 *
 * @Description:
 * @Modified By:
 */
public class ResultUtils {
    public static Result success(Object object){
        Result result = new Result();
        result.setCode(0);
        result.setMessage("成功");
        result.setData(object);

        return result;
    }

    public static Result success(){
        return success(null);
    }
    public static Result error(Integer code,String message){
        Result result = new Result();
        result.setCode(code);
        result.setMessage(message);

        return result;
    }
}
